package com.reptile.lottery.controller;

import com.reptile.lottery.service.SportsLottoService;
import com.reptile.lottery.service.TwoColorBallService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Description:
 * Author:zhouyongqiang
 * Date: 2020/12/22 14:50
 * Copyright (c) 2020,All Rights Reserved.
 */
@RestController
public class SportsLottoController {
    @Autowired
    private SportsLottoService sportsLottoService;
    @Autowired
    private TwoColorBallService twoColorBallService;

    @GetMapping("/")
    public String Hello() {
        return "Hello";
    }

    @GetMapping("/searchAllSportsLotto")
    public Map<String, Object> searchAllSportsLotto() {
        sportsLottoService.searchAllSportsLotto();
        Map<String, Object> result = new HashMap<>();
        result.put("code", 200);
        result.put("message", "操作成功");
        return result;
    }

    @GetMapping("/searchAllTwoColorBall")
    public Map<String, Object> searchAllTwoColorBall() {
        twoColorBallService.searchAllTwoColorBalls();
        Map<String, Object> result = new HashMap<>();
        result.put("code", 200);
        result.put("message", "操作成功");
        return result;
    }
}
